﻿using Abp.Domain.Entities;
using HCD.Enums;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace HCD.Entities
{
    [Table("MDT_MASTER")]
    public class MdtMaster : Entity<long>
    {
        /// <summary>
        /// 病人标识
        /// </summary>
        [Column("PATIENT_ID", TypeName = "VARCHAR(20)")]
        public string PatientId { get; set; }

        /// <summary>
        /// 就诊标识
        /// </summary>
        [Column("VISIT_ID", TypeName = "VARCHAR(20)")]
        public string VisitId { get; set; }

        /// <summary>
        /// 会诊流水号
        /// </summary>
        [Column("SERIAL_NO", TypeName = "VARCHAR(60)")]
        public string SerialNo { get; set; }

        /// <summary>
        /// 会诊要务
        /// </summary>
        [Column("PRIORITY", TypeName = "VARCHAR(60)")]
        public string Priority { get; set; }

        /// <summary>
        /// 会诊目的
        /// </summary>
        [Column("PURPOSE", TypeName = "VARCHAR(60)")]
        public string Purpose { get; set; }

        /// <summary>
        /// 会诊说明
        /// </summary>
        [Column("DESCRIPTION", TypeName = "VARCHAR(60)")]
        public string Description { get; set; }

        /// <summary>
        /// 会诊状态
        /// </summary>
        [Column("STATUS", TypeName = "INT")]
        public EnumMdtMasterStatus Status { get; set; }

        /// <summary>
        /// 会诊医生/组
        /// </summary>
        [Column("GROUP_ID", TypeName = "BIGINT")]
        public long GroupId { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        [Column("CREATED_BY", TypeName = "VARCHAR(60)")]
        public string CreatedBy { get; set; }

        /// <summary>
        /// 创建人姓名
        /// </summary>
        [Column("CREATED_BY_NAME", TypeName = "VARCHAR(60)")]
        public string CreatedByName { get; set; }

        /// <summary>
        /// 发起时间
        /// </summary>
        [Column("CREATED_TIME", TypeName = "DATETIME")]
        public DateTime CreatedTime { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        [Column("END_TIME", TypeName = "DATETIME")]
        public DateTime EndTime { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [Column("UPDATED_TIME", TypeName = "TIMESTAMP(3)"), ConcurrencyCheck]
        public DateTime UpdatedTime { get; set; }

        /// <summary>
        /// 类型代码
        /// </summary>
        [Column("SIMPLE_TYPE_CODE", TypeName = "VARCHAR(20)"), Required]
        public string SimpleTypeCode { get; set; }

        /// <summary>
        /// 项目代码
        /// </summary>
        [Column("SIMPLE_ITEM_CODE")]
        public EnumBitwise SimpleItemCode { get; set; }
    }
}
